package com.spsy.pay.order;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: liuzhiping
 * @date: 2024/12/19 11:56
 **/
public class Main {

    public static void main(String[] args) throws Exception{
        Map<String,String> map = new HashMap<>();

        map.put("trade_type","NATIVE");

        map.put("sign_type","HMAC-SHA256");


        String sign = CommUtil.generateSignature(map, Constants.API_KEY, "HMACSHA256");

        String sign2 = CommUtil.genSign(map, Constants.API_KEY, "HMACSHA256");


        System.out.println(sign);
        System.out.println(sign2);


        if (sign.equals(sign2)){
            System.out.println("success");
        }

    }
}
